package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SrSeatMapper;
import com.ruoyi.system.domain.SrSeat;
import com.ruoyi.system.service.ISrSeatService;

/**
 * 座位Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-04
 */
@Service
public class SrSeatServiceImpl implements ISrSeatService 
{
    @Autowired
    private SrSeatMapper srSeatMapper;

    /**
     * 查询座位
     * 
     * @param seatId 座位主键
     * @return 座位
     */
    @Override
    public SrSeat selectSrSeatBySeatId(Long seatId)
    {
        return srSeatMapper.selectSrSeatBySeatId(seatId);
    }

    /**
     * 查询座位列表
     * 
     * @param srSeat 座位
     * @return 座位
     */
    @Override
    public List<SrSeat> selectSrSeatList(SrSeat srSeat)
    {
        return srSeatMapper.selectSrSeatList(srSeat);
    }

    /**
     * 新增座位
     * 
     * @param srSeat 座位
     * @return 结果
     */
    @Override
    public int insertSrSeat(SrSeat srSeat)
    {
        srSeat.setCreateTime(DateUtils.getNowDate());
        return srSeatMapper.insertSrSeat(srSeat);
    }

    /**
     * 修改座位
     * 
     * @param srSeat 座位
     * @return 结果
     */
    @Override
    public int updateSrSeat(SrSeat srSeat)
    {
        srSeat.setUpdateTime(DateUtils.getNowDate());
        return srSeatMapper.updateSrSeat(srSeat);
    }

    /**
     * 批量删除座位
     * 
     * @param seatIds 需要删除的座位主键
     * @return 结果
     */
    @Override
    public int deleteSrSeatBySeatIds(Long[] seatIds)
    {
        return srSeatMapper.deleteSrSeatBySeatIds(seatIds);
    }

    /**
     * 删除座位信息
     * 
     * @param seatId 座位主键
     * @return 结果
     */
    @Override
    public int deleteSrSeatBySeatId(Long seatId)
    {
        return srSeatMapper.deleteSrSeatBySeatId(seatId);
    }
}
